<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片切换</title>
</head>
<body>
  <div id="app">
 
   <button v-show="index>0" @click="index--">上一页</button>
   <div>
    <img :src="list[index]" alt="">
   </div>
   <button v-show="index<3" @click="index++">下一页</button>
 
  </div>
  <script src="./js/2.7.14_dist_vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        index: 1,
        list: [
          './images/OIP-C.jpg',
        './images/20195311151665394.jpg',
        './images/2a89206bad6167236e7d5f2a9f38cfb4.jpeg'
        ]
      }
    })
  </script>
</body>
</html>